'use strict';

module.exports = app => {
  const { INTEGER, DATE, ENUM } = app.Sequelize;

  const UserBrowse = app.model.define('user_browse', {
    id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    user_id: INTEGER,
    browse_id: INTEGER,
    type: {
      type: ENUM('job','shift_work'),
      allowNull: false,
      comment: '浏览的数据类型 job 工作'
    },
    created_at: DATE,
    updated_at: DATE,
  }, {
    tableName: 'user_browers',
    timestamps: true,
  });

  return UserBrowse;
};
